<?php

// itraukti pagrindini Doctrine klases faila
require_once('Doctrine.php');
spl_autoload_register(array('Doctrine', 'autoload'));

// sukuriamas Doctrine manager'is
$manager = Doctrine_Manager::getInstance();

// sukuriamas duomenu bazes rysys
$connection = Doctrine_Manager::connection('mysql://root@localhost/db_thuythao', 'doctrine')
        ->setCharset('utf8');

// auto-generuojami modeliai
Doctrine::generateModelsFromDb('models', array('doctrine'), array(
    'classPrefix' => 'TTF_Model_'));